.org 0xE24F0 ; Highlight - Air Units

Unit_Highlight_Air_Units:

	LDRB 	R1, [R0, 1]
	ANDS 	R1, R1, 8
	MOVNE 	R0, 0
	BXNE 	LR
	LDRB 	R2, [R0, 0]
	MOV 	R0, 0x6C
	LDR 	R1, [Air_Units_Sub]
	MUL 	R0, R2, R0
	LDRB 	R0, [R1, R0]
	
	ADD		R0, R0, 0xFD
	AND		R0, R0, 0xFF
		
	CMP 	R0, 1						; Is unit an Air Unit?

	MOVLS 	R0, #1						; If yes, highlight unit
	MOVHI 	R0, #0						; If no, don't highlight unit

	BX 		LR

Air_Units_Sub:
	.dw 0x022F4FD4	